import { Component, OnInit } from '@angular/core';
import { CommonserviceService } from 'src/app/services/commonservice.service';

@Component({
  selector: 'app-home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.scss']
})
export class HomeComponent implements OnInit {

  public list=[];

  public domain='';

  constructor(public common: CommonserviceService) {


    this.domain=this.common.domain;
   }

  ngOnInit() {
    var api='api/productlist';
    this.common.get(api).then((response: any) => {
      console.log(response);
      this.list = response.result;
    })
  }

}
